package bpm.domain.process;

import java.io.Serializable;

/**
 * 
 * @author <a mailto="hwangsyin@gmail.com">King</a>
 *
 */
public class NodeView implements Serializable {
	private static final long serialVersionUID = 1L;
	
	public String processId;
	public String id;
	public String name;
	public String nodeTypeId;
	public String nodeTypeName;
	public String taskType;
	public String reference;
	public String description;
	
	public NodeView(){}
	public NodeView(Node node) {
		if(node.getProcessDefinition() != null) {
			this.processId = node.getProcessDefinition().getId();
		}
		this.id = node.getId();
		this.name = node.getName();
		if(node.getType() != null) {
			this.nodeTypeId = node.getType().name();
			this.nodeTypeName = node.getType().description();
		}
		if(node.getTaskType() != null) {
			this.taskType = node.getTaskType().name();
		}
		this.reference = node.getReference();
		this.description = node.getDescription();
	}
}
